O bibliotece ggplot2

Motywacja - kilka przykładów

  1. Wykres punktowy
  1. Wykres spaghetti
  1. Economics style
  1. Mapa
  1. Frankenstein

Gramatyka wykresu

# ggplot(ramka_z_danymi, aes(x = ?, y = ?, color = ?, fill = ?, label = ?, 
#                            shape = ?, size = ?)) +
#     geom_point(...) +
#     geom_bar(...) +
#     geom_line(...) +
#     geom_text(...) +
#     ...
#     coord_flip(...) +
#     ...
#     facet_grid(...) +
#     ...     
#     theme_(bw/minimal/gray/...) +
#         theme(axis.title = element_text(...),
#               axis.text = element_text(...),
#               legend.position = "top/bottom/...") +
#         labs(title = "...", x = "...", y = "...") +
#     ...
#     scale_y_manual(values = ..., name = "...", label = ...) +
#     scale_y_discrete() +
#     scale_y_continuous() +
#     scale_color_manual() +
#     ...